package com.woniu.client;

import com.github.pagehelper.PageInfo;
import com.woniu.config.FeignConfig;
import com.woniu.form.AdminInfoForm;
import com.woniu.form.SelAdminInfoForm;
import com.woniu.form.UpdateAdminInfoForm;
import com.woniu.zsd.commons.core.model.Result;
import com.woniu.zsd.permission.entity.AdminInfo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

@FeignClient(name = "zsd-permission", configuration = FeignConfig.class)
public interface PermissionClient {
    @PostMapping("/admin-info/selectAdminInfoByIds")
    Result<List<AdminInfo>> selectAdminInfoByIds(@RequestBody Set<Integer> adminIds);
    @GetMapping("/admin-info/selAdminInfoById")
    public Result<PageInfo<AdminInfo>> selAdminInfoById(@RequestParam("siteId") Integer id,
                                                        @RequestParam("adminId") Integer workId,
                                                        @RequestParam("pageNum") Integer pageNum,
                                                        @RequestParam("pageSize") Integer pageSize,
                                                        @RequestParam("phone") String phone);
    @PostMapping("/admin-info/insertAdminInfo")
    Result insertAdminInfo(@RequestBody AdminInfoForm aif);

    @PostMapping("/admin-info/updateAdminInfo")
    Result updateAdminInfo(@RequestBody UpdateAdminInfoForm uaif);

    @GetMapping("/admin-info/getCustomerService")
    Result<Integer> getCustomerService(@RequestParam("userId") Integer userId);
}
